{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\perezeo\Dropbox\Language, Gender & Politics\Estonia\Language and Ethnic\JEPS\Final\JEPS_replication\Study3_analysis_log.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}16 Aug 2018, 06:56:52

{com}. do "C:\Users\perezeo\Dropbox\Language, Gender & Politics\Estonia\Language and Ethnic\JEPS\Final\JEPS_replication\WVS_sample_comp.do"
{txt}
{com}. ****************************************************************************************************************************
. ***  PROJECT:  "Language Heightens the Political Salience of Ethnic Divisions", Journal of Experimental Political Science
. ***  AUTHORS: Efren O. Perez and Margit Tavits
. ***  DESCRIPTION: Stata code to replicate comparisons of WVS sample and those of Study 1 and Study 2
. ***  DATE: June 6, 2018
. ****************************************************************************************************************************
. 
. ************************************************************
. **Comparison of WVS samples and Study 1&2 samples in the SI
. ************************************************************
. 
. set more off
{txt}
{com}. 
. ***Table SI.2.1
. **Compare means and proportions; WVS compared to Study 1
. prtest female if study==1 | study==6, by(study)

{txt}Two-sample test of proportions                     {res}1{txt}: Number of obs = {res}     262
                                                   6{txt}: Number of obs = {res}    1533
{txt}{hline 13}{c TT}{hline 64}
    Variable {c |}{col 22}Mean{col 29}Std. Err.{col 44}z{col 49}P>|z|{col 59}[95% Conf. Interval]
{hline 13}{c +}{hline 64}
{col 12}1{col 14}{c |}{res}{col 17} .5343511{col 28} .0308171{col 58} .4739507{col 70} .5947516
           {txt}6 {c |}{res}{col 17}  .553816{col 28} .0126961{col 58} .5289322{col 70} .5786998
{txt}{hline 13}{c +}{hline 64}
        diff {c |}{res}{col 17}-.0194649{col 28} .0333299{col 58}-.0847904{col 70} .0458606
{txt}{col 14}{c |}{col 17}under Ho:{res}{col 28} .0332515{col 38}   -0.59{col 49}0.558
{txt}{hline 13}{c BT}{hline 64}
        diff = prop({res}1{txt}) - prop({res}6{txt})                                  z = {res} -0.5854
{txt}    Ho: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = {res}0.2791         {txt}Pr(|Z| > |z|) = {res}0.5583          {txt}Pr(Z > z) = {res}0.7209
{txt}
{com}. ttest age if study==1 | study==6, by(study)

{txt}Two-sample t test with equal variances
{hline 9}{c TT}{hline 68}
   Group{col 10}{c |}{col 16}Obs{col 27}Mean{col 35}Std. Err.{col 47}Std. Dev.{col 59}[95% Conf. Interval]
{hline 9}{c +}{hline 68}
       1 {c |}{res}{col 12}    262{col 22} 54.01145{col 34} .8160394{col 46} 13.20875{col 58} 52.40459{col 70} 55.61831
       {txt}6 {c |}{res}{col 12}  1,533{col 22} 48.57273{col 34} .4726997{col 46} 18.50787{col 58} 47.64553{col 70} 49.49994
{txt}{hline 9}{c +}{hline 68}
combined {c |}{res}{col 12}  1,795{col 22} 49.36657{col 34} .4232702{col 46} 17.93287{col 58} 48.53642{col 70} 50.19673
{txt}{hline 9}{c +}{hline 68}
    diff {c |}{res}{col 22} 5.438717{col 34} 1.192274{col 58} 3.100326{col 70} 7.777109
{txt}{hline 9}{c BT}{hline 68}
    diff = mean({res}1{txt}) - mean({res}6{txt})                                      t = {res}  4.5616
{txt}Ho: diff = 0                                     degrees of freedom = {res}    1793

    {txt}Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = {res}1.0000         {txt}Pr(|T| > |t|) = {res}0.0000          {txt}Pr(T > t) = {res}0.0000
{txt}
{com}. ttest edu if study==1 | study==6, by(study)

{txt}Two-sample t test with equal variances
{hline 9}{c TT}{hline 68}
   Group{col 10}{c |}{col 16}Obs{col 27}Mean{col 35}Std. Err.{col 47}Std. Dev.{col 59}[95% Conf. Interval]
{hline 9}{c +}{hline 68}
       1 {c |}{res}{col 12}    262{col 22}  3.69084{col 34} .0621293{col 46} 1.005651{col 58} 3.568501{col 70} 3.813178
       {txt}6 {c |}{res}{col 12}  1,533{col 22} 3.337247{col 34} .0269254{col 46} 1.054223{col 58} 3.284433{col 70} 3.390062
{txt}{hline 9}{c +}{hline 68}
combined {c |}{res}{col 12}  1,795{col 22} 3.388858{col 34} .0248875{col 46} 1.054421{col 58} 3.340046{col 70}  3.43767
{txt}{hline 9}{c +}{hline 68}
    diff {c |}{res}{col 22} .3535925{col 34}  .070013{col 58} .2162769{col 70} .4909081
{txt}{hline 9}{c BT}{hline 68}
    diff = mean({res}1{txt}) - mean({res}6{txt})                                      t = {res}  5.0504
{txt}Ho: diff = 0                                     degrees of freedom = {res}    1793

    {txt}Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = {res}1.0000         {txt}Pr(|T| > |t|) = {res}0.0000          {txt}Pr(T > t) = {res}0.0000
{txt}
{com}. 
. **Compare means and proportions; WVS compared to Study 2
. prtest female if study==2 | study==6, by(study)

{txt}Two-sample test of proportions                     {res}2{txt}: Number of obs = {res}    1200
                                                   6{txt}: Number of obs = {res}    1533
{txt}{hline 13}{c TT}{hline 64}
    Variable {c |}{col 22}Mean{col 29}Std. Err.{col 44}z{col 49}P>|z|{col 59}[95% Conf. Interval]
{hline 13}{c +}{hline 64}
{col 12}2{col 14}{c |}{res}{col 17}    .6075{col 28} .0140962{col 58} .5798719{col 70} .6351281
           {txt}6 {c |}{res}{col 17}  .553816{col 28} .0126961{col 58} .5289322{col 70} .5786998
{txt}{hline 13}{c +}{hline 64}
        diff {c |}{res}{col 17}  .053684{col 28} .0189708{col 58} .0165018{col 70} .0908661
{txt}{col 14}{c |}{col 17}under Ho:{res}{col 28} .0190398{col 38}    2.82{col 49}0.005
{txt}{hline 13}{c BT}{hline 64}
        diff = prop({res}2{txt}) - prop({res}6{txt})                                  z = {res}  2.8196
{txt}    Ho: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = {res}0.9976         {txt}Pr(|Z| > |z|) = {res}0.0048          {txt}Pr(Z > z) = {res}0.0024
{txt}
{com}. ttest age if study==2 | study==6, by(study)

{txt}Two-sample t test with equal variances
{hline 9}{c TT}{hline 68}
   Group{col 10}{c |}{col 16}Obs{col 27}Mean{col 35}Std. Err.{col 47}Std. Dev.{col 59}[95% Conf. Interval]
{hline 9}{c +}{hline 68}
       2 {c |}{res}{col 12}  1,200{col 22} 50.64167{col 34} .4006336{col 46} 13.87836{col 58} 49.85565{col 70} 51.42769
       {txt}6 {c |}{res}{col 12}  1,533{col 22} 48.57273{col 34} .4726997{col 46} 18.50787{col 58} 47.64553{col 70} 49.49994
{txt}{hline 9}{c +}{hline 68}
combined {c |}{res}{col 12}  2,733{col 22} 49.48116{col 34} .3187455{col 46} 16.66341{col 58} 48.85615{col 70} 50.10616
{txt}{hline 9}{c +}{hline 68}
    diff {c |}{res}{col 22} 2.068933{col 34} .6411729{col 58} .8117005{col 70} 3.326166
{txt}{hline 9}{c BT}{hline 68}
    diff = mean({res}2{txt}) - mean({res}6{txt})                                      t = {res}  3.2268
{txt}Ho: diff = 0                                     degrees of freedom = {res}    2731

    {txt}Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = {res}0.9994         {txt}Pr(|T| > |t|) = {res}0.0013          {txt}Pr(T > t) = {res}0.0006
{txt}
{com}. ttest edu if study==2 | study==6, by(study)

{txt}Two-sample t test with equal variances
{hline 9}{c TT}{hline 68}
   Group{col 10}{c |}{col 16}Obs{col 27}Mean{col 35}Std. Err.{col 47}Std. Dev.{col 59}[95% Conf. Interval]
{hline 9}{c +}{hline 68}
       2 {c |}{res}{col 12}  1,200{col 22} 3.760833{col 34} .0292901{col 46} 1.014638{col 58} 3.703368{col 70} 3.818299
       {txt}6 {c |}{res}{col 12}  1,533{col 22} 3.337247{col 34} .0269254{col 46} 1.054223{col 58} 3.284433{col 70} 3.390062
{txt}{hline 9}{c +}{hline 68}
combined {c |}{res}{col 12}  2,733{col 22} 3.523235{col 34} .0202368{col 46} 1.057943{col 58} 3.483553{col 70} 3.562916
{txt}{hline 9}{c +}{hline 68}
    diff {c |}{res}{col 22} .4235861{col 34} .0399714{col 58} .3452089{col 70} .5019634
{txt}{hline 9}{c BT}{hline 68}
    diff = mean({res}2{txt}) - mean({res}6{txt})                                      t = {res} 10.5972
{txt}Ho: diff = 0                                     degrees of freedom = {res}    2731

    {txt}Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = {res}1.0000         {txt}Pr(|T| > |t|) = {res}0.0000          {txt}Pr(T > t) = {res}0.0000
{txt}
{com}. ttest ideology if study==2 | study==6, by(study)

{txt}Two-sample t test with equal variances
{hline 9}{c TT}{hline 68}
   Group{col 10}{c |}{col 16}Obs{col 27}Mean{col 35}Std. Err.{col 47}Std. Dev.{col 59}[95% Conf. Interval]
{hline 9}{c +}{hline 68}
       2 {c |}{res}{col 12}    738{col 22} 5.649051{col 34} .0750568{col 46} 2.039004{col 58} 5.501701{col 70} 5.796402
       {txt}6 {c |}{res}{col 12}  1,275{col 22}  5.38902{col 34} .0525816{col 46} 1.877539{col 58} 5.285864{col 70} 5.492176
{txt}{hline 9}{c +}{hline 68}
combined {c |}{res}{col 12}  2,013{col 22} 5.484352{col 34} .0432805{col 46} 1.941843{col 58} 5.399472{col 70} 5.569231
{txt}{hline 9}{c +}{hline 68}
    diff {c |}{res}{col 22} .2600319{col 34} .0896508{col 58} .0842137{col 70}   .43585
{txt}{hline 9}{c BT}{hline 68}
    diff = mean({res}2{txt}) - mean({res}6{txt})                                      t = {res}  2.9005
{txt}Ho: diff = 0                                     degrees of freedom = {res}    2011

    {txt}Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = {res}0.9981         {txt}Pr(|T| > |t|) = {res}0.0038          {txt}Pr(T > t) = {res}0.0019
{txt}
{com}. 
. ***SI.6: Comparison of median education levels
. by study, sort: summarize edu, detail

{txt}{hline}
-> study = 1

                             edu
{hline 61}
      Percentiles      Smallest
 1%    {res}        2              2
{txt} 5%    {res}        2              2
{txt}10%    {res}        3              2       {txt}Obs         {res}        262
{txt}25%    {res}        3              2       {txt}Sum of Wgt. {res}        262

{txt}50%    {res}        3                      {txt}Mean          {res}  3.69084
                        {txt}Largest       Std. Dev.     {res} 1.005651
{txt}75%    {res}        5              5
{txt}90%    {res}        5              5       {txt}Variance      {res} 1.011333
{txt}95%    {res}        5              5       {txt}Skewness      {res} .3304793
{txt}99%    {res}        5              5       {txt}Kurtosis      {res} 1.547432

{txt}{hline}
-> study = 2

                             edu
{hline 61}
      Percentiles      Smallest
 1%    {res}        2              1
{txt} 5%    {res}        3              2
{txt}10%    {res}        3              2       {txt}Obs         {res}      1,200
{txt}25%    {res}        3              2       {txt}Sum of Wgt. {res}      1,200

{txt}50%    {res}        3                      {txt}Mean          {res} 3.760833
                        {txt}Largest       Std. Dev.     {res} 1.014638
{txt}75%    {res}        5              5
{txt}90%    {res}        5              5       {txt}Variance      {res} 1.029491
{txt}95%    {res}        5              5       {txt}Skewness      {res} .2181229
{txt}99%    {res}        5              5       {txt}Kurtosis      {res} 1.452839

{txt}{hline}
-> study = 6

                             edu
{hline 61}
      Percentiles      Smallest
 1%    {res}        1              1
{txt} 5%    {res}        2              1
{txt}10%    {res}        2              1       {txt}Obs         {res}      1,533
{txt}25%    {res}        3              1       {txt}Sum of Wgt. {res}      1,533

{txt}50%    {res}        3                      {txt}Mean          {res} 3.337247
                        {txt}Largest       Std. Dev.     {res} 1.054223
{txt}75%    {res}        4              5
{txt}90%    {res}        5              5       {txt}Variance      {res} 1.111386
{txt}95%    {res}        5              5       {txt}Skewness      {res} .2784046
{txt}99%    {res}        5              5       {txt}Kurtosis      {res} 2.270344

{txt}
{com}. 
{txt}end of do-file

{com}. exit, clear
